package com.league.blog.service.impl;

import com.league.blog.mapper.ArticleMapper;
import com.league.blog.pojo.ArticleWithBLOBs;
import com.league.blog.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 黄豪琦
 * 日期:2020-04-07 13:09
 * 说明:
 */
@Service("ArticleService")
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    ArticleMapper articleMapper;

    @Override
    public int saveArticle(ArticleWithBLOBs article) {
        return articleMapper.insertSelective(article);
    }

    @Override
    public ArticleWithBLOBs findArticleByCode(String articleCode) {
        return articleMapper.selectByArticleCode(articleCode);
    }
}
